/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-12-10     xu       the first version
 */
#ifndef APPLICATIONS_HZK16_H_
#define APPLICATIONS_HZK16_H_
#include <stdint.h>

// #define APP_BUILD_HZK16_TO_FIRMWARE

struct hzk16_info {
    uint16_t width;
    uint16_t height;
    uint32_t size;
};

typedef struct hzk16_info hzk16_info_t; // value type

union hzk16_code {
    uint16_t unicode;
    uint8_t gbk_code[4];
};

typedef union hzk16_code hzk16_code_t; // value type

struct hzk16_data {
    uint32_t size;
    uint8_t data[0];
};

typedef struct hzk16_data* hzk16_data_t; // as object type

const hzk16_info_t* hzk16_get_font_info();

hzk16_data_t hzk16_data_create();

void hzk16_data_destroy(hzk16_data_t data);

int hzk16_get_font_data(hzk16_code_t chinese, hzk16_data_t data);

extern const uint32_t hzk16_font_size;

extern const uint32_t hzk16_db_size;

#ifdef APP_BUILD_HZK16_TO_FIRMWARE
extern const uint8_t hzk16[];
#endif

#endif /* APPLICATIONS_HZK16_H_ */
